﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Netcached.Tests
{
    [TestClass]
    public class TestTouch : BaseTestClass
    {
        [TestMethod]
        public void TestTouchExisting()
        {
            string key = "TestTouch.TestTouchExisting";

            Client.Set(key, "data");

            bool result = Client.Touch(key, 500);
            Assert.IsTrue(result);
        }

        [TestMethod]
        public void TestTouchNonExisting()
        {
            string key = "TestTouch.TestTouchNonExisting";

            bool result = Client.Touch(key, 500);
            Assert.IsFalse(result);
        }
    }
}
